package desarrollo;

import java.awt.*;
import java.awt.event.*;

public class Pocisiones {

    public static void main(String args[]) {

        Frame f = new Frame("pocisiones");
        final TextField tf = new TextField("");
        final TextField tf1 = new TextField("");
        Panel p = new Panel();
        Panel p1 = new Panel();
        Label l = new Label("X");
        Label l1 = new Label("Y");
        f.add(BorderLayout.SOUTH, p);
        p.add(l);
        p.add(tf);
        f.add(BorderLayout.NORTH, p1);
        p.add(l1);
        p.add(tf1);
        p1.addMouseMotionListener(new MouseMotionAdapter() {

            public void mouseMoved(MouseEvent e) {
                e.getX();
                tf.setText(e.getX() + "");
                e.getY();
                tf1.setText(e.getY() + "");
            }
        });
        f.setSize(300, 200);
        f.setLocation(100, 200);
        f.setVisible(true);
    }
}
